﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ServiceModel;

namespace GanoESB
{
    /// <summary>
    /// 中间件服务总线
    /// </summary>
    [ServiceContract]
    public interface IServiceBus
    {
        [OperationContract]
        void Start();

        [OperationContract]
        void Stop();

        [OperationContract]
        MessageResponse Execute(string secretKey, MessageRequest request);

        [OperationContract]
        void RegisterService(ServiceDescriptor[] descr);

        [OperationContract]
        void UnregisterService(ServiceDescriptor descr);

        [OperationContract]
        void StartService(string serviceName);

        [OperationContract]
        void StopService(string serviceName);

        [OperationContract]
        ServiceItem FindServiceByType(string name);

        [OperationContract]
        ServiceDetail[] GetServiceDetails();

        [OperationContract]
        ServiceDetail GetServiceDetail(string serviceName);

        [OperationContract]
        ServiceCall[] GetServiceCalls(string serviceName);
    }
}
